package main

import (
	"fmt"
	"reflect"
)

type SayHello interface {
	SayHello()
}

type Student struct {
	SName string `json:"s_name"`
	Age   int    `json:"age"`
}

func (s Student) SayHello() {
	fmt.Println("Hello")
}

func main() {
	var student Student
	tOfStudent := reflect.TypeOf(student)

	for i := 0; i < tOfStudent.NumField(); i++ {
		field := tOfStudent.Field(i)
		fmt.Println(field.Tag)
	}
	if field, ok := tOfStudent.FieldByName("SName"); ok {
		json := field.Tag.Get("json")
		fmt.Println(json)
	}
}
